package com.jk.dmconsumer.service;

import com.jk.dmcommon.entity.ShopEntity;
import com.jk.dmcommon.entity.TicketEntity;
import com.jk.dmcommon.entity.YeWuEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 赵优秀
 * @version 1.0.0
 * @ClassName ShopService.java
 * @Description TODO
 * @createTime 2021年09月09日 16:42:00
 */
@Component
@FeignClient(value = "dmshopprovider")
public interface ShopService {
    @RequestMapping("shop/findShop")
    ShopEntity findShop(@RequestParam("goodsId") Integer goodsId);
    //购买时要使用的优惠券
    @RequestMapping("/shop/getCoupon")
    List<TicketEntity> getCoupon();

    @PostMapping("/shop/buy")
    YeWuEntity buy(@RequestBody YeWuEntity yeWuEntity);

    @PostMapping("/shop/affirmBuy")
    YeWuEntity affirmBuy(YeWuEntity yeWuEntity);
    //生成座位
    @RequestMapping("/shop/createSite")
    String createSite(@RequestParam Integer id);
    //提交选座
    @RequestMapping("/shop/subSite")
    String subSite(@RequestParam String siteArr,@RequestParam Integer id);
}
